import argparse

from src import window, message, messageBox, screenshot


if __name__ == "__main__":
    # 创建解析器对象
    parser = argparse.ArgumentParser()
    parser.add_argument("--component", "-c", type=str, default="", help="组件类型")
    params = parser.parse_known_args()

    if params[0].component == 'window':
        window.create(parser)
    elif params[0].component == 'message':
        message.create(parser)
    elif params[0].component == 'messageBox':
        messageBox.create(parser)
    elif params[0].component == 'screenshot':
        screenshot.create(parser)
    else:
        print(f"未知组件类型: {params[0].component}")